obj
	door
		SecurityCenter
			name = "Security Center"
			icon = 'door.dmi'
			icon_state = "security"
			density = 1
			opacity = 1
			layer = 2
			Click()
				if(usr.job == ("Security"))
					density = 0
					opacity = 0
					icon_state = "security open"
					sleep(30)
					density = 1
					opacity = 1
					icon_state = "security"
				if(usr.job == ("Captain"))
					density = 0
					opacity = 0
					icon_state = "security open"
					sleep(30)
					density = 1
					opacity = 1
					icon_state = "security"
				else
					usr << "You are not security!"
			DblClick()
				var/random = rand(1,25)
				if(usr.job == "Security")
					usr << "You can't hack your own door!"
				else
					if(random == 17)
						usr << "You hacked the door!"
						density = 0
						opacity = 0
						icon_state = "security open"
						sleep(30)
						density = 1
						opacity = 1
						icon_state = "security"
					else
						usr << "You failed to hack the door!"